<template>
	<view class="contact-offical">
		<template>
			<view class="header black" style="text-align: center;   margin-top: 50rpx ;" >
				<!-- <view class="title x ">{{ distribution.distribution_agent_name }}店主为您服务</view> -->
					
							
				<view class="line m-t-36"></view>
			</view>
			<view class="content flex-col col-center">
				<view class="content-view flex-col col-center bg-white text-center">
					<view class="xs lighter m-t-10">
		
					</view>
					<image :show-menu-by-longpress="true" class="contact-image" :src="distribution.business_card" @click="saveBusinessCard"></image>
					<view class="flex row-center copy-btn white lg br60 m-t-10 m-b-40" @tap="saveBusinessCard">
						长按可添加分享人微信
					</view>
					
					</view>
				</view>
			<!-- <u-modal :content="'即将打电话给'+ server.config.phone" v-model="showPhoneCall" show-cancel-button confirm-text='呼叫'
				:confirm-color="colorConfig.primary" @confirm="onCall">
			</u-modal> -->
		</template>

		
	</view>
</template>

<script>
	import {
		mapGetters
	} from 'vuex';
	import Cache from '@/utils/cache';
	import {
		DISTRIBUTION
	} from "@/config/cachekey";
	export default {
		data() {
			return {
				imgUrl:`${this.$imgUrl}/`,
			}
		},

		onLoad() {
			
		},
		
		computed:{
			...mapGetters(["distribution"]),
		},

		methods: {
			saveBusinessCard(){
				uni.previewImage({
				      // 需要预览的图片链接列表
				      urls: [this.distribution.business_card],
				      // 为当前显示图片的链接/索引值
				      current: this.distribution.business_card,
				      // 图片指示器样式  
				      indicator:'default',
				      // 是否可循环预览
				      loop:false,
				      // 长按图片显示操作菜单，如不填默认为保存相册
				      // longPressActions:{
				      //  itemList:[this.l('发送给朋友'),this.l]
				      // },
				      success: res => {
				        console.log('res', res);
				      }, 
				      fail: err => {
				        onsole.log('err', err);
				      }
				    });
			}
		}
	}
</script>

<style lang="scss">
	page {
		padding: 0;
	}
	.contact-offical {
		min-height: 100vh;
		&.shop-contact {
			
			.header{
				.line {
					background:#00632B;
				}
			}
		}
		.header {
			// padding: 80rpx 50rpx 0;
			.line {
				height: 25rpx;
				// background: #00632B;
				border-radius: 20rpx;
			}
		}
		.content {
			margin-top: -10rpx;
			.content-view {
				width: 620rpx;
				padding: 80rpx 20rpx 40rpx;
				.contact-image{
					width: 450rpx;
					height: 600rpx;
				}
			}

			.phone-btn {
				padding: 2rpx 19rpx;
				// border: 1px solid #D7D7D7;
				border-radius: 10rpx;
			}
			.copy-btn {
				border: 1px solid #00632B;
				background: #ffffff;
				color: #00632B;
				width: 460rpx;
				height: 84rpx;
				// box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
			}
		}
	}
</style>
